var twoSum = function (nums, target) {
  let count = 0;
  for (let index in nums) {
    let INDEX = parseInt(index);
    let newArray = nums.slice(INDEX + 1);
    count++;
    for (let insideIndex in newArray) {
      let INSIDEINDEX = parseInt(insideIndex);
      if (nums[index] + newArray[insideIndex] === target) {
        let result = [];
        result.push(index);
        result.push(INSIDEINDEX + count);
        return result;
      }
    }
  }
};
